<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"
	dir="ltr">
	<head>

		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="<c:url value="/css/shopadmin.css"/>"
			type="text/css" />


	</head>
	<body style="">
		<div class="head_content" id="headBar" style=""></div>
		<div class="main_content" id="main">

			<div class="tableform">

				<div class="note">
					当您的商城需要暂停营业的时候，您可以在下面输入框输入停业公告，并点击下面“暂停营业”按钮，这样当用户访问商店的时候就会看到商店关闭停业的通知，并且无法访问商店的任何链接。
					<br>
						当您需要恢复营业的时候，点击“开启商城”按钮即可。 
				</div>
				<div class="division">
					<table>
						<tbody>
							<tr>
								<th>
									商店当前状态：
								</th>
								<td>
									<div class="" id="ss_status">
										<form action="sys_setting_save.html" method="post">
											<input type="hidden" name=systemSettings.settingId
												value="${suspendOperation.settingId}" />
											<input type="hidden" name="redirect" value="sys_suspend" />
											<c:if test="${suspendOperation.data == 'false'}">
												<input type="hidden" name=systemSettings.data value="true" />
										正常营业中<button style="margin-left: 15px;" class="btn"
													type="submit">
													<span><span>暂停营业</span> </span>
												</button>
											</c:if>
											<c:if test="${suspendOperation.data == 'true'}">
												<input type="hidden" name=systemSettings.data value="false" />
										暂停营业<button style="margin-left: 15px;" class="btn"
													type="submit">
													<span><span>开启商城</span> </span>
												</button>
											</c:if>
										</form>

									</div>
								</td>
							</tr>
						</tbody>
					</table>
					<table>
						<tbody>
							<tr>
								<th>
									停业公告：
								</th>
								<td>
									<form class="tableform" method="post" id="suspend_page_form"
										action="sys_setting_save.html">
										<input type="hidden" name=systemSettings.settingId
											value="${systemSettings.settingId}" />
										<input type="hidden" name="redirect" value="sys_suspend" />
										<textarea class="jquery_ckeditor" cols="80" id="editor1"
											name="systemSettings.data" rows="10">${systemSettings.data}
									</textarea>
									</form>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div class="table-action">
					<button class="btn" onclick="subPage()" type="button">
						<span><span>提交</span> </span>
					</button>
				</div>
			</div>
		</div>
		<div class="foot_content" id="footBar" style="font-size: 0px;"></div>
		<script type="text/javascript"
			src="<c:url value='/scripts/jquery-1.4.2.js'/>"></script>
		<script type="text/javascript"
			src="<c:url value="/ckeditor/ckeditor.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/ckeditor/adapters/jquery.js"/>"></script>
		<script type="text/javascript">	
	var config = {
		toolbar:
		[
			[ 'Bold', 'Italic', 'Underline', 'StrikeThrough', '-',
							'Subscript', 'Superscript' ],
					[ 'OrderedList', 'UnorderedList', '-', 'Outdent', 'Indent',
							'Blockquote' ],
					[ 'JustifyLeft', 'JustifyCenter', 'JustifyRight',
							'JustifyFull' ],
					[ 'Link', 'Unlink', 'Anchor' ],
					[ 'Style', 'FontFormat', 'FontName', 'FontSize' ],
					[ 'Image', 'Flash', 'Table', 'Rule', 'Smiley',
							'SpecialChar' ], [ 'TextColor', 'BGColor','Source' ]
		],
		filebrowserImageUploadUrl : '<c:url value="/uploadFile.html?Type=Image"/>' 
	};
	$('.jquery_ckeditor').ckeditor(config);      
	
 
 	function subPage(){
 		$('#suspend_page_form').submit(); 	
 	}

	var status =${suspendOperation.data};
	if(status){
		$('#ss_status').attr('class','error');
	}else{
		$('#ss_status').attr('class','success');
	}


</script>

	</body>
</html>